home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
scope
/
101-125
/
scopedisk113
/
empire
/
doc
/
hosting
< prev
next >
Wrap
Text File
|
1995-03-19
|
12KB
|
262 lines
Amiga Empire by Chris Gray - Hosting an Empire Game
Hosting an Amiga Empire game is fairly straightforward in the normal cases,
and can be done on a floppy based Amiga with no expansion memory. Hosting a
large game requires a hard disk because of the size of the data files, but
it is unlikely that more than a handfull of people in the world would want
to do that (you would need an Amiga with a half dozen modems and serial
ports, along with a dozen or two people wanting to play the game!) The
first step is to decide where you want the data files to go. All of the
files will be generated when the world creation program, EmpCre, is run.
Summary of Hosting
1) Decide where the game files are to go. For a first try, just have them
in the 'Game' directory.
2) Create the world. For a first test world, a 16 x 16 world will do just
fine. From a shell, CD to the Games directory and type:
EmpCre < 16x16
From WorkBench, open the Game drawer and double click on the 16x16
icon. A window will be opened for output messages. In either case you
will get a lot of output as EmpCre tries to randomly create a world as
defined by the parameters in the '16x16' file. The world will be 16
sectors high by 16 sectors wide, and will have 3 countries, a deity
called 'god' with password 'godpassword', and space for 2 regular
countries. The country creation password will be 'creationpassword'.
A compressed map of the created world will be shown. The 'I's mark rich
iron deposits, the 'G's mark rich gold deposits, and the 'X's mark
sectors rich in both iron and gold. The data files for the world will
be created. Any files left over from a previous game in the same
directory will be deleted.
It is possible that EmpCre will fail to satisfactorily create a world,
due to lack of connected space for santuaries, lack of accessible rich
deposits, etc. In this case, no map will be shown and no files will be
created. Just run EmpCre again to try again with the same parameters.
If you run EmpCre directly, it will prompt you for all of the
parameters it needs. Everything defaults, so you can just hit RETURN
for each one. These parameters are described in more detail later.
3) Run the server. From a shell, type
Run EmpServ
From WorkBench, double click on the EmpServ icon. There will be some
disk activity as the server starts up, and reads in the basic world and
country information. It will then be ready to accept requests from
client programs.
4) Run client programs. From a shell, CD to the Progs directory and type:
Run SEREmp
Empire
From WorkBench, find and open the Progs drawer, then double click on
the SEREmp icon and then the Empire icon. When the first one is
started, it will have to load 'Empire.libary' from your LIBS directory
(you did copy it to there didn't you?), so there will be a fair amount
of disk activity. It is not necessary to run both SEREmp and Empire,
but doing so shows the multi-player nature of this release of Amiga
Empire. SEREmp will attempt to open the serial port (it will need
DEVS:serial.device in order to do this), for a 2400/1200/300 baud
connection at either no or even parity. If you have a modem connected
to your regular serial port, you should see the DTR light come on.
Empire will open a window for WorkBench, or use your shell window. You
should see:
Welcome to Amiga Empire Version 2.0!!
by Chris Gray
Enter country name:
At this point you can either log in as country 'god' with password
'godpassword', or create a new country with whatever name and password
you want. Empire will then ask you for the country creation password,
which is 'creationpassword' if you used EmpCre as above. File 'Intro'
contains a log of a sample session of starting up a new country.
NOTE: a couple of commands in Amiga Empire, notably 'map', 'power', and
'radar', require a large amount of stack space. The client programs
check the stack size given to them and will not run if it is less than
25000. My guess is that this is at least twice as much as needed, so it
should be quite safe.
5) Shut down the game. If you are running Empire locally, type 'bye' to
exit. This will leave you in the shell or will close the window and
leave you back in WorkBench. SEREmp and the server will still be
running, however. To shut them down, from a shell type:
EmpShut
From WorkBench, double click on the EmpShut icon. In a second or two
all SEREmps running and the server should shut down. If someone is
connected to a SEREmp and is playing, the shutdown of that SEREmp and
of the server will be delayed until that player leaves.
From the shell, the effect of an EmpShut can also be done by sending a
control-C signal to the server. Issue the 'Status' command to see the
various CLI processes running (WorkBench tasks do NOT show up), and
note the CLI number for EmpServ. Use the 'Break' command to send the
signal, as in
Break #
where '#' is the appropriate CLI number. This technique can also be
used to shut down individual SEREmps. In cases where it appears a
SEREmp may have locked up, or you want the remote user to get off NOW,
you can use 'Break # f' to force an immediate disconnect. This is not
a very nice thing to do, however, and may not work with all non-
standard serial ports.
6) Logfile, etc. Empire writes a logfile, normally 'RAM:empire.log',
showing connections, disconnections and country changes that have
occured. It is also possible that error comments from the server could
appear. You can delete this logfile between runs, or you can let it
accumulate, in order to collect statistics on country usage, serial
port usage, etc. When you want to restart the game from where it left
off, just go back to step 3 above. Note that there is no problem with
leaving the SEREmps and the server running at all times - they use very
little CPU time.
File Space Needed
The files would normally be all in one directory, but the capability exists
of storing them in several directories, and across multiple disks. Files
used by the game are:
empire.files - lists paths to the various files/directories. Normally
not present, in which case everything defaults to the current
directory.
empire.world (.5K) - various constants defining the world, its weather,
update factors, damage factors, etc.
empire.country (13K) - an array of 45 country structures. Each country
structure contains the country name, password, realms, user flags,
wealth, fleet indicators, etc.
empire.sector (varies) - an array of the sectors in the world. Each
sectors occupies about 40 bytes, so a 16 x 16 world will have a 10K
sector file, and a 256 x 256 world will have a 2.6 Meg file.
empire.ship (varies) - an array of the ships in the world. Each ship
occupies about 20 bytes. A small game will probably top out at 100
ships or less (2K), but a large world can have thousands.
empire.fleet (varies) - an array of the fleets in the world. Each fleet
occupies about 200 bytes. Most countries use no more than half a
dozen fleets at the most. A very long game with a lot of naval
activity could have more, however.
empire.loan (varies) - an array of all loans offered in the world. Each
loan occupies about 17 bytes. Loans are very infrequent.
empire.offer (varies) - an array of all sales offers in the world. Each
offer occupies about 4 bytes, so this file is quite small.
empire.power (varies) - the current power report for the game. It is
quite small (about 80 bytes per active country).
telegrams.XXX - a telegram file for each country. The size will be
determined by the maximum size of undeleted telegrams the country
has ever had. These are only a problem for a country that hasn't
deleted them for a long time (perhaps the player has left) and the
country is under heavy attack. In these cases a deity can log on to
the country and delete the telegrams.
news.XXX - news files. News items are automatically generated by the
program as events occur. Each item is small (8 bytes), and a new
file is started for each "day". Old news files can be deleted - if
someone asks to read them they will get no news.
prop.XXX - propaganda files. Rarely used, and not very big.
Four files can be created in the base directory and will be used by Empire
if they are present. They are:
empire.conMess - printed as soon as a connection is made, before the
country name prompt is given
empire.logMess - printed after a country has logged in
empire.logMess - printed when a country logs out
empire.bulletin - printed as the first part of the newspaper
Alternate File Placement
If you do not have space in one directory for EmpCre, EmpServ and all of
the data files for a world (plus all of the online help files in a
directory beside the one the game files are in), then you can split them up
by using an 'empire.files' file. Also, you can move EmpCre and EmpServ to
different directories, and then tell them where the Game directory is.
Running a 128 x 128 world on a two-floppy system should be possible. To
have EmpCre and EmpServ in a directory other than the base directory which
will contain the game files, you can run them directly from a shell, or,
from WorkBench, you can use the WorkBench Info menu item to add a Tool Type
that looks like:
PATH=directory
Note that if 'directory' does not end in a ':', it must end in a '/', since
EmpCre and EmpServ just add their specific file names onto the end of it.
For example, if you want to use a floppy in drive DF1 for the files, you
would use:
PATH=DF1:
If you wanted to use directory 'Empire.Game' on your 'DH0' hard disk
partition, then you would use:
PATH=DH0:Empire.Game/
You must use the same path for both EmpCre and EmpServ, or the server won't
be able to find the files that EmpCre created. Also, the default path for
find finding help files is '/Help/', so the help files are normally in a
directory called help which is beside the directory the game files are in.
Similarly, the doc file directory defaults to '/Doc/'.
To split the files across multiple directories or drives, you must use a
text editor (e.g. Ed or Emacs) to create a file called 'empire.files' in
your base game directory. It should contain one path per line, with the
paths being given in the following order:
full path for the log file
full path for the world file
full path for the country file
full path for the sector file
full path for the ship file
full path for the fleet file
full path for the loan file
full path for the offer file
full path, ending in '/' for the help directory
full path, ending in '/' for the doc directory
The telegram, news, and propaganda files will always be in the same
directory as the 'empire.files' file. As an example, here is an
'empire.files' file which puts the log file on RAM, the sectors file on
DF1, the help and doc directories on DF2 and everything else on DF0:
RAM:empire.log
DF0:empire.world
DF0:empire.country
DF1:empire.sector
DF0:empire.ship
DF0:empire.fleet
DF0:empire.loan
DF0:empire.offer
DF2:empire.help/
DF2:empire.doc/
With this file, you would want the PATH to be 'DF0:'.
The client programs SEREmp and Empire, along with EmpShut, do not need to
know where the data files are since they communicate only with the server
through an Amiga Exec message port. There are many options that you can
give to SEREmp, so it is described in a separate file. Similarly, the world
creation parameters of EmpCre are described separately. If Empire is run
from a shell, it can have a single flag, '-a', which tells it that it is
running in a non-standard environment, typically over the serial port using
the AUX: device. Normally, it uses control sequences understood by the
Amiga console windows to turn off character display when reading passwords.
This likely does not work for a terminal connected over the serial port (it
locks the keyboard on mine!), so with '-a' specified, no password blanking
will be done. This same flag applies to EmpCre as well.